home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
sbin
/
update-icon-caches
< prev
next >
Wrap
Text File
|
2009-10-19
|
596b
|
27 lines
#!/bin/sh
case "$1" in
""|-h|--help)
echo "Usage: $0 directory [ ... ]"
exit 1
;;
esac
for dir in "$@"; do
if [ ! -d "$dir" ]; then
continue
fi
if [ -f "$dir"/index.theme ]; then
# Generate or regenerate the cache
if ! gtk-update-icon-cache --force --quiet "$dir"; then
echo "WARNING: icon cache generation failed for $dir"
fi
else
# No more index.theme, remove the cache if it exists
rm -f "$dir"/icon-theme.cache
rmdir -p --ignore-fail-on-non-empty "$dir"
fi
done
exit 0